#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
	string str;
	int flag = 0;
	cin >> str;
	if (str[0] == '-') {
		flag = 1;
		str.erase(0, 1);
	}
	for (int i = str.size() - 1;i > 0&&str[i]=='0';i--) {
		str.erase(i, 1);
	}
	reverse(str.begin(), str.end());
	if(flag==1)
		cout << '-' << str << endl;
	else
		cout <<  str << endl;
	return 0;
}